﻿<%@ Page Title="Strategic Asset Management Las Vegas: Rental" Language="C#"
   MasterPageFile="~/Site2.Master" AutoEventWireup="true" CodeBehind="RentProjectionUnit.aspx.cs"
   Inherits="LenderClearingHouse.RentProjectionUnit" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="ListFilterControl.ascx" TagName="ListFilterControl" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphPageHeader" runat="server">
   Rental Units&nbsp;(Apn:<asp:Label runat="server" ID="lblApn"/>, Property:<asp:Label runat="server" ID="lblProperty"/>)
   <div style="float:right; padding-right:10px;"><asp:LinkButton runat="server" ID="btnBack" OnClick="btnBack_Click">Back to Search Result</asp:LinkButton></div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphMain" runat="server">
   <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
      <AjaxSettings>
         <telerik:AjaxSetting AjaxControlID="grid">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="grid" UpdatePanelHeight="" />
            </UpdatedControls>
         </telerik:AjaxSetting>
      </AjaxSettings>
   </telerik:RadAjaxManager>
   <asp:SqlDataSource ID="SqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:SQLConnection %>"
      OnSelecting="SqlDataSource_Selecting" SelectCommand="getRentProjectionUnit" CancelSelectOnNullParameter="false"
      SelectCommandType="StoredProcedure">
      <SelectParameters>
         <asp:Parameter ConvertEmptyStringToNull="False" Name="Apn" Type="String" />
      </SelectParameters>
   </asp:SqlDataSource>
   <div class="panel2">
   </div>   
   <div class="panel7">
      <telerik:RadGrid ID="grid" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource"
         Width="1160px" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True"
         PageSize="10" ShowFooter="True" ShowStatusBar="True" 
         OnInsertCommand="grid_InsertCommand" OnUpdateCommand="grid_UpdateCommand" SortCommand="grid_SortCommand"
         OnItemDataBound="grid_ItemDataBound" OnDeleteCommand="grid_DeleteCommand">
         <GroupingSettings CaseSensitive="False" />
         <ClientSettings>
            <Scrolling ScrollHeight="500px" AllowScroll="True" UseStaticHeaders="True" FrozenColumnsCount="2" />
         </ClientSettings>
         <MasterTableView DataSourceID="SqlDataSource" Width="100%" DataKeyNames="RentProjectionUnitId" CommandItemDisplay="Top">
            <Columns>
               <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmText="Delete this Rent Projection Unit item?"
                  ConfirmTitle="Delete" UniqueName="column" HeaderStyle-Width="20px"/>
               <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-Width="20px"/>
                              
               <telerik:GridBoundColumn DataField="UnitNumber" HeaderText="Unit #" SortExpression="UnitNumber" UniqueName="UnitNumber"/>
               <telerik:GridBoundColumn DataField="SquareFootage" HeaderText="Square Footage" SortExpression="SquareFootage" UniqueName="SquareFootage"/>
               <telerik:GridBoundColumn DataField="Bedrooms" HeaderText="Bedrooms" SortExpression="Bedrooms" UniqueName="Bedrooms"/>
               <telerik:GridBoundColumn DataField="Bathrooms" HeaderText="Bathrooms" SortExpression="Bathrooms" UniqueName="Bathrooms"/>
               <telerik:GridBoundColumn DataField="Rehab" DataType="System.Decimal" HeaderText="Rehab" SortExpression="Rehab" UniqueName="Rehab" DataFormatString="{0:c}"/>
              
            </Columns>
            <EditFormSettings EditFormType="WebUserControl" UserControlName="RentProjectionUnitEditControl.ascx">
               <EditColumn UniqueName="EditCommandColumn1">
               </EditColumn>
            </EditFormSettings>
            <PagerStyle AlwaysVisible="True" />
         </MasterTableView>
         <PagerStyle AlwaysVisible="True" />
      </telerik:RadGrid>
   </div>
</asp:Content>
